#ifndef GNFINDPATHSAVE2DBTHREAD_H
#define GNFINDPATHSAVE2DBTHREAD_H

#include "dbquerybasethread.h"

class FindPathDBQThread : public QThread
{
protected:
    virtual void run() override;
};

class GnFindPathDBThread : public DbQueryBaseThread {
    Q_OBJECT
public:
    Q_INVOKABLE GnFindPathDBThread();
};

CNS_COM_DECL_METATYPE(GnFindPathDBThread)

class SysGnFindPathDBThread : public QObject
{
    Q_OBJECT
public:
    Q_INVOKABLE SysGnFindPathDBThread();

    Q_INVOKABLE void f_initDbQueryThread(CnsComponentPtr com, QVariantHash& props, QScopedPointer<QThread>& thread);
    void saveToPathFilesTable(CnsComponentPtr com, CnsComponentPtr thread_com);

public slots:
    void stop(CnsComponentPtr com);
    bool query_b(CnsComponentPtr com, CnsComponentPtr gnFindPathDBThread);
    Q_INVOKABLE void f_emitPushFilePaths(CnsComponentPtr com, const QVariantHash& props);
};

Q_DECLARE_METATYPE(SysGnFindPathDBThread*)

#endif // GNFINDPATHSAVE2DBTHREAD_H
